(function() {
	var $optimizeForm = $('#optimize-form');
	var $newTitle = $('td.title input.new-title', $optimizeForm);
	var $history = $('table.history');
	
	$('td.title a', $history).click(function(){
		var title = $(this).text();
		$newTitle.val(title);
		$newTitle.focus();
		return false;
	});
})();